__wxCodeSpace__.batchAddCompiledTemplate(function (G, R, D, Q, gdc, X, Y, Z) {
  return {
    "pages/rank/rank": (() => {
      var P = "pages/rank/rank";
      var H = {};
      var I = {};
      H[""] = I[""] = (R, C, D, U) => {
        var L = R.c;
        var M = R.m;
        var O = R.r;
        var A = { currentIndex: new Array(4), scrollHeight: new Array(3) };
        var K = U === true;
        return {
          C: (C, T, E) => {
            E(
              "view",
              {},
              (N, C) => {
                if (C) L(N, "view-navBox");
              },
              (C, T, E) => {
                E(
                  "view",
                  {},
                  (N, C) => {
                    if (C) L(N, "title-box");
                    if (C) R.r(N, "bindtap", "onClickNavBox");
                    if (C) R.d(N, "idx", "0");
                  },
                  (C, T, E) => {
                    E(
                      "text",
                      {},
                      (N, C) => {},
                      (C, T) => {
                        C ? T("日榜") : T();
                      }
                    );
                    E(
                      "view",
                      {},
                      (N, C) => {
                        if (C || K || !!U.currentIndex || undefined)
                          L(
                            N,
                            0 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        A["currentIndex"][0] = (D, E, T) => {
                          L(
                            N,
                            0 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        };
                      },
                      (C) => {}
                    );
                  }
                );
                E(
                  "view",
                  {},
                  (N, C) => {
                    if (C) L(N, "title-box");
                    if (C) R.r(N, "bindtap", "onClickNavBox");
                    if (C) R.d(N, "idx", "1");
                  },
                  (C, T, E) => {
                    E(
                      "text",
                      {},
                      (N, C) => {},
                      (C, T) => {
                        C ? T("周榜") : T();
                      }
                    );
                    E(
                      "view",
                      {},
                      (N, C) => {
                        if (C || K || !!U.currentIndex || undefined)
                          L(
                            N,
                            1 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        A["currentIndex"][1] = (D, E, T) => {
                          L(
                            N,
                            1 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        };
                      },
                      (C) => {}
                    );
                  }
                );
                E(
                  "view",
                  {},
                  (N, C) => {
                    if (C) L(N, "title-box");
                    if (C) R.r(N, "bindtap", "onClickNavBox");
                    if (C) R.d(N, "idx", "2");
                  },
                  (C, T, E) => {
                    E(
                      "text",
                      {},
                      (N, C) => {},
                      (C, T) => {
                        C ? T("月榜") : T();
                      }
                    );
                    E(
                      "view",
                      {},
                      (N, C) => {
                        if (C || K || !!U.currentIndex || undefined)
                          L(
                            N,
                            2 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        A["currentIndex"][2] = (D, E, T) => {
                          L(
                            N,
                            2 == D.currentIndex ? "line-box" : "no-line-box"
                          );
                        };
                      },
                      (C) => {}
                    );
                  }
                );
              }
            );
            E(
              "swiper",
              {},
              (N, C) => {
                if (C) L(N, "view-swiper");
                if (C) R.y(N, "height: 100%");
                if (C || K || U.currentIndex) O(N, "current", D.currentIndex);
                A["currentIndex"][3] = (D, E, T) => {
                  O(N, "current", D.currentIndex);
                  E(N);
                };
                if (C) R.r(N, "bindchange", "onSwiperChange");
              },
              (C, T, E) => {
                E(
                  "swiper-item",
                  {},
                  (N, C) => {
                    if (C) L(N, "swiper-item");
                  },
                  (C, T, E) => {
                    E(
                      "scroll-view",
                      {},
                      (N, C) => {
                        if (C || K || undefined) O(N, "scroll-y", true);
                        if (C || K || !!U.scrollHeight || undefined)
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        A["scrollHeight"][0] = (D, E, T) => {
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        };
                      },
                      (C, T, E, B) => {
                        var a = X(D.medalInfo).length ? 1 : 0;
                        B(a, (C, T, E) => {
                          if (a === 1) {
                            E(
                              "view",
                              {},
                              (N, C) => {
                                if (C) L(N, "rank-header");
                              },
                              (C, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "2");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 1;
                                        var c = 1;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-2.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "todayDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .todayDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "1");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 0;
                                        var c = 0;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-1.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "todayDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .todayDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "3");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 2;
                                        var c = 2;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-3.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "todayDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .todayDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                              }
                            );
                          }
                        });
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-user");
                          },
                          (C, T, E, B) => {
                            var b = D.userRank > 0 ? 1 : 0;
                            B(b, (C, T, E) => {
                              if (b === 1) {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C || K || !!U.userRank || undefined
                                      ? T(
                                          Y(
                                            "#你今天排名第" +
                                              Y(D.userRank) +
                                              "名哦#"
                                          )
                                        )
                                      : T();
                                  }
                                );
                              } else {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C ? T("#你今天还没有排名哦#") : T();
                                  }
                                );
                              }
                            });
                          }
                        );
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-list");
                          },
                          (C, T, E, B, F) => {
                            F(
                              D.runDistanceList,
                              "user_openId",
                              U ? U.runDistanceList : undefined,
                              ["runDistanceList"],
                              (C, b, c, d, e, f, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-item");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-item-content");
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(U.medalInfo, "length") ||
                                            e ||
                                            e
                                          ) ||
                                          undefined
                                        )
                                          R.d(
                                            N,
                                            "index",
                                            X(D.medalInfo).length
                                              ? c + 4
                                              : c + 1
                                          );
                                        if (C)
                                          R.r(N, "bindtap", "onGetUserInfo");
                                      },
                                      (C, T, E) => {
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-left");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) R.y(N, "width: 130rpx;");
                                              },
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!(
                                                  Z(U.medalInfo, "length") ||
                                                  e ||
                                                  e
                                                ) ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        X(D.medalInfo).length
                                                          ? c + 4
                                                          : c + 1
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                            E(
                                              "image",
                                              {},
                                              (N, C) => {
                                                if (
                                                  C ||
                                                  K ||
                                                  !!(
                                                    Z(
                                                      Z(d, "user_avator"),
                                                      "length"
                                                    ) || Z(d, "user_avator")
                                                  ) ||
                                                  undefined
                                                )
                                                  O(
                                                    N,
                                                    "src",
                                                    X(X(b).user_avator).length
                                                      ? X(b).user_avator
                                                      : "../../images/avator.png"
                                                  );
                                              },
                                              (C) => {}
                                            );
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) L(N, "nickname");
                                              },
                                              (C, T) => {
                                                C || K || Z(d, "user_nickname")
                                                  ? T(Y(X(b).user_nickname))
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-right");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {},
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!Z(d, "todayDistance") ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        Y(X(b).todayDistance) +
                                                          " km"
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                      }
                                    );
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "item-divide-line");
                                      },
                                      (C) => {}
                                    );
                                  }
                                );
                              }
                            );
                          }
                        );
                      }
                    );
                  }
                );
                E(
                  "swiper-item",
                  {},
                  (N, C) => {
                    if (C) L(N, "swiper-item");
                  },
                  (C, T, E) => {
                    E(
                      "scroll-view",
                      {},
                      (N, C) => {
                        if (C || K || undefined) O(N, "scroll-y", true);
                        if (C || K || !!U.scrollHeight || undefined)
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        A["scrollHeight"][1] = (D, E, T) => {
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        };
                      },
                      (C, T, E, B) => {
                        var a = X(D.medalInfo).length ? 1 : 0;
                        B(a, (C, T, E) => {
                          if (a === 1) {
                            E(
                              "view",
                              {},
                              (N, C) => {
                                if (C) L(N, "rank-header");
                              },
                              (C, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "2");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 1;
                                        var c = 1;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-2.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisWeekRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisWeekRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "1");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 0;
                                        var c = 0;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-1.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisWeekRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisWeekRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "3");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 2;
                                        var c = 2;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-3.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisWeekRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisWeekRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                              }
                            );
                          }
                        });
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-user");
                          },
                          (C, T, E, B) => {
                            var b = D.userRank > 0 ? 1 : 0;
                            B(b, (C, T, E) => {
                              if (b === 1) {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C || K || !!U.userRank || undefined
                                      ? T(
                                          Y(
                                            "#你本周排名第" +
                                              Y(D.userRank) +
                                              "名哦#"
                                          )
                                        )
                                      : T();
                                  }
                                );
                              } else {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C ? T("#你本周还没有排名哦#") : T();
                                  }
                                );
                              }
                            });
                          }
                        );
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-list");
                          },
                          (C, T, E, B, F) => {
                            F(
                              D.runDistanceList,
                              "user_openId",
                              U ? U.runDistanceList : undefined,
                              ["runDistanceList"],
                              (C, b, c, d, e, f, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-item");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-item-content");
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(U.medalInfo, "length") ||
                                            e ||
                                            e
                                          ) ||
                                          undefined
                                        )
                                          R.d(
                                            N,
                                            "index",
                                            X(D.medalInfo).length
                                              ? c + 4
                                              : c + 1
                                          );
                                        if (C)
                                          R.r(N, "bindtap", "onGetUserInfo");
                                      },
                                      (C, T, E) => {
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-left");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) R.y(N, "width: 130rpx;");
                                              },
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!(
                                                  Z(U.medalInfo, "length") ||
                                                  e ||
                                                  e
                                                ) ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        X(D.medalInfo).length
                                                          ? c + 4
                                                          : c + 1
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                            E(
                                              "image",
                                              {},
                                              (N, C) => {
                                                if (
                                                  C ||
                                                  K ||
                                                  !!(
                                                    Z(
                                                      Z(d, "user_avator"),
                                                      "length"
                                                    ) || Z(d, "user_avator")
                                                  ) ||
                                                  undefined
                                                )
                                                  O(
                                                    N,
                                                    "src",
                                                    X(X(b).user_avator).length
                                                      ? X(b).user_avator
                                                      : "../../images/avator.png"
                                                  );
                                              },
                                              (C) => {}
                                            );
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) L(N, "nickname");
                                              },
                                              (C, T) => {
                                                C || K || Z(d, "user_nickname")
                                                  ? T(Y(X(b).user_nickname))
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-right");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {},
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!Z(d, "thisWeekRunDistance") ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        Y(
                                                          X(b)
                                                            .thisWeekRunDistance
                                                        ) + " km"
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                      }
                                    );
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "item-divide-line");
                                      },
                                      (C) => {}
                                    );
                                  }
                                );
                              }
                            );
                          }
                        );
                      }
                    );
                  }
                );
                E(
                  "swiper-item",
                  {},
                  (N, C) => {
                    if (C) L(N, "swiper-item");
                  },
                  (C, T, E) => {
                    E(
                      "scroll-view",
                      {},
                      (N, C) => {
                        if (C || K || undefined) O(N, "scroll-y", true);
                        if (C || K || !!U.scrollHeight || undefined)
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        A["scrollHeight"][2] = (D, E, T) => {
                          R.y(
                            N,
                            "width: 100%; height:" + Y(D.scrollHeight) + "rpx;"
                          );
                        };
                      },
                      (C, T, E, B) => {
                        var a = X(D.medalInfo).length ? 1 : 0;
                        B(a, (C, T, E) => {
                          if (a === 1) {
                            E(
                              "view",
                              {},
                              (N, C) => {
                                if (C) L(N, "rank-header");
                              },
                              (C, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "2");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 1;
                                        var c = 1;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-2.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 1;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisMonthRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisMonthRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "1");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 0;
                                        var c = 0;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-1.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 0;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisMonthRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisMonthRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-medal");
                                    if (C) R.d(N, "index", "3");
                                    if (C) R.r(N, "bindtap", "onGetUserInfo");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-avator");
                                        var b = 2;
                                        var c = 2;
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(
                                              Z(
                                                Z(U.medalInfo, b),
                                                "user_avator"
                                              ),
                                              "length"
                                            ) ||
                                            Z(Z(U.medalInfo, c), "user_avator")
                                          ) ||
                                          undefined
                                        )
                                          O(
                                            N,
                                            "src",
                                            X(X(X(D.medalInfo)[b]).user_avator)
                                              .length
                                              ? X(X(D.medalInfo)[c]).user_avator
                                              : "../../images/avator.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "image",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-medal-level");
                                        if (C)
                                          O(
                                            N,
                                            "src",
                                            "../../images/medal-3.png"
                                          );
                                      },
                                      (C) => {}
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-nickname");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        Z(Z(U.medalInfo, b), "user_nickname")
                                          ? T(
                                              Y(
                                                X(X(D.medalInfo)[b])
                                                  .user_nickname
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                    E(
                                      "text",
                                      {},
                                      (N, C) => {
                                        if (C) R.i(N, "text-distance");
                                      },
                                      (C, T) => {
                                        var b = 2;
                                        C ||
                                        K ||
                                        !!Z(
                                          Z(U.medalInfo, b),
                                          "thisMonthRunDistance"
                                        ) ||
                                        undefined
                                          ? T(
                                              Y(
                                                Y(
                                                  X(X(D.medalInfo)[b])
                                                    .thisMonthRunDistance
                                                ) + " km"
                                              )
                                            )
                                          : T();
                                      }
                                    );
                                  }
                                );
                              }
                            );
                          }
                        });
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-user");
                          },
                          (C, T, E, B) => {
                            var b = D.userRank > 0 ? 1 : 0;
                            B(b, (C, T, E) => {
                              if (b === 1) {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C || K || !!U.userRank || undefined
                                      ? T(
                                          Y(
                                            "#你本月排名第" +
                                              Y(D.userRank) +
                                              "名哦#"
                                          )
                                        )
                                      : T();
                                  }
                                );
                              } else {
                                E(
                                  "text",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-user-text");
                                  },
                                  (C, T) => {
                                    C ? T("#你本月还没有排名哦#") : T();
                                  }
                                );
                              }
                            });
                          }
                        );
                        E(
                          "view",
                          {},
                          (N, C) => {
                            if (C) L(N, "rank-list");
                          },
                          (C, T, E, B, F) => {
                            F(
                              D.runDistanceList,
                              "user_openId",
                              U ? U.runDistanceList : undefined,
                              ["runDistanceList"],
                              (C, b, c, d, e, f, T, E) => {
                                E(
                                  "view",
                                  {},
                                  (N, C) => {
                                    if (C) L(N, "rank-item");
                                  },
                                  (C, T, E) => {
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "rank-item-content");
                                        if (
                                          C ||
                                          K ||
                                          !!(
                                            Z(U.medalInfo, "length") ||
                                            e ||
                                            e
                                          ) ||
                                          undefined
                                        )
                                          R.d(
                                            N,
                                            "index",
                                            X(D.medalInfo).length
                                              ? c + 4
                                              : c + 1
                                          );
                                        if (C)
                                          R.r(N, "bindtap", "onGetUserInfo");
                                      },
                                      (C, T, E) => {
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-left");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) R.y(N, "width: 130rpx;");
                                              },
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!(
                                                  Z(U.medalInfo, "length") ||
                                                  e ||
                                                  e
                                                ) ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        X(D.medalInfo).length
                                                          ? c + 4
                                                          : c + 1
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                            E(
                                              "image",
                                              {},
                                              (N, C) => {
                                                if (
                                                  C ||
                                                  K ||
                                                  !!(
                                                    Z(
                                                      Z(d, "user_avator"),
                                                      "length"
                                                    ) || Z(d, "user_avator")
                                                  ) ||
                                                  undefined
                                                )
                                                  O(
                                                    N,
                                                    "src",
                                                    X(X(b).user_avator).length
                                                      ? X(b).user_avator
                                                      : "../../images/avator.png"
                                                  );
                                              },
                                              (C) => {}
                                            );
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {
                                                if (C) L(N, "nickname");
                                              },
                                              (C, T) => {
                                                C || K || Z(d, "user_nickname")
                                                  ? T(Y(X(b).user_nickname))
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                        E(
                                          "view",
                                          {},
                                          (N, C) => {
                                            if (C) L(N, "rank-item-right");
                                          },
                                          (C, T, E) => {
                                            E(
                                              "text",
                                              {},
                                              (N, C) => {},
                                              (C, T) => {
                                                C ||
                                                K ||
                                                !!Z(
                                                  d,
                                                  "thisMonthRunDistance"
                                                ) ||
                                                undefined
                                                  ? T(
                                                      Y(
                                                        Y(
                                                          X(b)
                                                            .thisMonthRunDistance
                                                        ) + " km"
                                                      )
                                                    )
                                                  : T();
                                              }
                                            );
                                          }
                                        );
                                      }
                                    );
                                    E(
                                      "view",
                                      {},
                                      (N, C) => {
                                        if (C) L(N, "item-divide-line");
                                      },
                                      (C) => {}
                                    );
                                  }
                                );
                              }
                            );
                          }
                        );
                      }
                    );
                  }
                );
              }
            );
          },
          B: A,
        };
      };
      return function (P) {
        return H[P];
      };
    })(),
  };
});
__wxRoute = "pages/rank/rank";
__wxRouteBegin = true;
__wxAppCurrentFile__ = "pages/rank/rank.js";
define(
  "pages/rank/rank.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    "use strict";
    var n = require("../../D38F48309100CF2FB5E920376AFB2D82.js"),
      a = getApp();
    Page({
      data: {
        currentIndex: 0,
        swiperHeight: 150,
        scrollHeight: 750,
        medalInfo: [],
        runDataInfo: [],
      },
      onLoad: function (n) {
        this.getRunRank(0);
      },
      getRunRank: function (t) {
        var e = this;
        wx.showLoading({ title: "加载中" });
        var o = {
          purpose: "getRunRank",
          key: { openId: a.globalData.openId, rankType: t },
        };
        n.request("", "GET", o)
          .then(function (n) {
            console.log(n),
              (e.data.runDataInfo = n.data.rankList),
              e.data.runDataInfo.length > 3
                ? ((e.data.medalInfo = e.data.runDataInfo.slice(0, 3)),
                  (e.data.runDistanceList = e.data.runDataInfo.slice(3)))
                : ((e.data.medalInfo = []),
                  (e.data.runDistanceList = e.data.runDataInfo));
            var a = wx.getSystemInfoSync().windowHeight,
              t = 750 / wx.getSystemInfoSync().windowWidth,
              o = 220 / t;
            e.setData(
              {
                scrollHeight: (a - o) * t,
                userRank: n.data.userRank,
                medalInfo: e.data.medalInfo,
                runDistanceList: e.data.runDistanceList,
              },
              function () {
                wx.hideLoading();
              }
            );
          })
          .catch(function (n) {
            console.log(n), wx.hideLoading();
          });
      },
      onClickNavBox: function (n) {
        this.setData({ currentIndex: n.currentTarget.dataset.idx });
      },
      onSwiperChange: function (n) {
        this.setData({ currentIndex: n.detail.current }),
          this.getRunRank(n.detail.current);
      },
      onGetUserInfo: function (n) {
        if (a.globalData.admin) {
          var t =
            this.data.runDataInfo[n.currentTarget.dataset.index - 1]
              .user_openId;
          wx.navigateTo({ url: "../../pages/record/record?user_openId=" + t });
        }
      },
      onReady: function () {},
      onShow: function () {},
      onHide: function () {},
      onUnload: function () {},
      onPullDownRefresh: function () {},
      onReachBottom: function () {},
      onShareAppMessage: function () {},
    });
  },
  { isPage: true, isComponent: true, currentFile: "pages/rank/rank.js" }
);
require("pages/rank/rank.js");
